package com.leetcode;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

/**
 * @BelongsProject: LeetCode
 * @BelongsPackage: com.leetcode
 * @Author: lei
 * @CreateTime: 2024-03-10  21:46
 * @Description: 输入为一行，为简化解析，用数字 12345代表 a,ctrl-c,ctrl-x,ctrl-v,ctrl-a五个键的输入，数字用空格分隔
 * 输出描述:
 * 输出一个数字，为最终屏目上字母的数量。
 * 示例:
 * 输入
 * 111
 * 输出
 * 3
 * @Version: 1.0
 */
public class 五键键盘的输出 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextLine()) {
            String str = scanner.nextLine();
            String[] split = str.split(" ");
            ArrayList<String> arrayList = new ArrayList<>();
            ArrayList<String> newList = new ArrayList<>();
            for (int i = 0; i < split.length; i++) {
                int j = Integer.parseInt(split[i]);
                switch (j) {
                    case 1:
                        arrayList.add("a");
                        System.out.println("a");
                    case 2:
                        if (arrayList.size() == 0) return;
                        Collections.copy(newList, arrayList);
                    case 3:

                }


            }
        }
    }
}
